package com.kgc.ebookmanager2.controller;



import com.kgc.ebookmanager2.entity.ResultEntity;
import com.kgc.ebookmanager2.pojo.Category;
import com.kgc.ebookmanager2.service.CategoryService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author shkstart
 *
 */
@RestController
public class CategoryController {
    @Resource
    CategoryService categoryService;
    @RequestMapping("/getCategoryList")
    public ResultEntity<List<Category>> getCategoryList(){
        List<Category> categoryList=categoryService.selectAll();
        return ResultEntity.successWithoutData(categoryList);
    }
}
